package org.codeart.adapter.example;

public class SDCardObjAdapter implements SDCard {
    
    private final TFCard tfCard;

    public SDCardObjAdapter(TFCard tfCard) {
        this.tfCard = tfCard;
    }

    @Override
    public String readSD() {
        System.out.println("adapter's reading data from TF card...");
        return tfCard.readTF();
    }

    @Override
    public void writeSD(String data) {
        System.out.println("adapter's writing data from TF card...");
        tfCard.writeTF(data);
    }
}
